<div class="page-content-wrap">
  <div class="row">
    <div class="col-md-4">
      <div class="panel panel-default">
        <div class="panel-heading ui-draggable-handle">
            <h4><span class="fa fa-folder"></span> <%= "#{zerocms_pluralize_text(@post_type.decorate.the_title)} / " if @post_type.present? %> <%= zerocms_pluralize_text(t('zerocms.admin.post_type.tags').to_s.titleize) %></h4>
        </div>
        <%= render partial: 'form' %>
      </div>
    </div>
    <div class="col-md-8">

      <!-- START BASIC TABLE SAMPLE -->
      <div class="panel panel-default">
        <div class="panel-heading ui-draggable-handle">
          <h4 class=""><%= t('zerocms.admin.page_title.list')%></h4>
        </div>
        <div class="panel-body">

          <table class="table table-responsive table-hover table-striped">
            <thead>
            <tr>
              <th><%= t('zerocms.admin.table.name')%></th>
              <th><%= t('zerocms.admin.table.description')%></th>
              <th><%= t('zerocms.admin.table.slug')%></th>
              <th><%= t('zerocms.admin.table.qty')%></th>
              <th><%= t('zerocms.admin.table.actions')%></th>
            </tr>
            </thead>

            <tbody>
                <% @post_tags.decorate.each do |tag| %>
                    <tr>
                        <td><%= tag.the_title %></td>
                        <td><%= tag.the_content %></td>
                        <td><%= tag.slug %></td>
                        <td><%= tag.count %></td>
                        <td>
                            <%= link_to raw('<i class="fa fa-eye"></i>'), tag.the_url, target: '_blank', class: "btn btn-info btn-xs", title: "#{t('zerocms.common.visit')}" %>
                            <%= link_to raw('<i class="fa fa-list"></i>'), zerocms_admin_post_type_taxonomy_posts_path(@post_type.id, "post_tag", tag.id), class: "btn btn-default btn-xs zerocms_ajax_request", title: "#{zerocms_pluralize_text(@post_type.decorate.the_title)}-#{tag.slug.to_s.titleize}" if @post_type.present? %>
                            <%= link_to raw('<i class="fa fa-pencil"></i>'), {action: :edit, id: tag.id }, class: "btn btn-default btn-xs zerocms_ajax_request", title: "#{t('zerocms.admin.button.edit')}" %>
                            <%= link_to raw('<i class="fa fa-times"></i>'), { action: :destroy, id: tag.id }, method: :delete, data: { confirm: t('zerocms.admin.message.delete') }, class: "btn btn-danger btn-xs zerocms_ajax_request", title: "#{t('zerocms.admin.button.delete')}" unless tag.get_option('not_deleted', false) %>
                        </td>
                    </tr>
                <% end %>
            </tbody>
          </table>
          <%= content_tag("div", raw(t('zerocms.admin.message.data_found_list')), class: "alert alert-warning") if @post_tags.empty? %>
          <%= raw zerocms_do_pagination(@post_tags) %>
        </div>
      </div>
      <!-- END BASIC TABLE SAMPLE -->
    </div>


  </div>

  <!-- END PAGE CONTENT WRAPPER -->
</div>
